target 'macOSTestApp' do
  platform :osx, '10.11'
  use_frameworks!
  pod 'Bugsnag', path: '../../..'
  pod 'BugsnagNetworkRequestPlugin', path: '../../..'
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    if target.name == "Bugsnag"
      target.build_configurations.each do |config|
        config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', 'BSG_LOG_LEVEL=BSG_LOGLEVEL_DEBUG BSG_KSLOG_ENABLED=1']
        config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES'

        # Include all our build warning settings without needing to duplicate them here
        xcconfig = "Pods/Target Support Files/#{target.name}/#{target.name}.#{config.name.downcase}.xcconfig"
        File.open(xcconfig, 'a') do |file|
          file << '#include "../../../../../../Bugsnag.xcconfig"'
        end
      end
    end
  end
end
